package com.example.demo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

import java.util.List;

@Service
public class MainService {

    @Autowired
    Hello hello;

    @Autowired
    JedisPool jedisPool;

    public List<String> getstr() {
        Jedis jedis = jedisPool.getResource();


        jedis.set("hh", "haha");
        System.out.println(jedis.get("hh"));
        jedis.close();

        System.out.println(hello.getmapper());
        return hello.getmapper();
    }
}


